package org.bw.bookstore.common.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 *@program: wisdom_bookstore
 *@description: 出门记录实体类
 *@Author: 孙冬雪
 *@Date: 2020-10-22 09:50
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Entity
@TableName("tb_out_record")
public class TbOutRecord extends BaseEntity implements Serializable {

    /**
     * outTime: 出门时间
     **/
    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date outTime;

    /**
     * userInfo: 用户信息
     **/
    private String userInfoCode;

    /**
     * 一个出门记录是一个用户产生的
     *
     * @Author 孙冬雪
     * @Date 2020/10/21 15:44
     **/
    @TableField(exist = false)
    @Transient
    private TbUserInfo tbUserInfo;

}
